Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Generalize hard-coded UTF-8 encoding #9

Merged
merged 3 commits into from
Apr 9, 2024

Conversation

jopemachine
Copy link
Member

@jopemachine jopemachine commented Apr 9, 2024

In the existing code, if the assumption that all strings are encoded in UTF-8 is broken, it will lead to a panic.
This is an unnecessary assumption in etcd-client-py, and handling it as Vec<u8> is the correct approach.
This PR makes the following changes:

  • Remove UTF-8 encoding assumption
  • Reflect test harness changes from Backend.AI
  • Remove useless APIs (put_prefix, replace)
  • Fix some typos (GRpcStatusCode -> GRPCStatusCode)

@jopemachine jopemachine changed the title feat: Remove utf8 assumption feat: Generalize hard-coded UTF-8 encoding Apr 9, 2024
@jopemachine jopemachine self-assigned this Apr 9, 2024
@jopemachine jopemachine marked this pull request as ready for review April 9, 2024 06:59
Copy link
Member

@achimnol achimnol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jopemachine jopemachine merged commit ab8a972 into main Apr 9, 2024
13 checks passed
@jopemachine jopemachine deleted the feat/remove-utf8-assumption branch April 9, 2024 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants